You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(approval): return to the approval behavior from before #4266 - #4337
#4266 (spec #4210) made every tool declared irreversible + external require approval, even under Full Access. Since then a Human has to approve each Bot DM, @mention, Subagent, Assignment and outbound CLI operation, and every click or keystroke in an authorized Browser or Computer session. The product owner decided to return to the approval behavior from before #4266: effect declarations only label cards.
Merge risk: two-way door (revert code and docs). Blast radius: approval admission for first-party tools, the CLI broker, and Browser/Computer pre-execute. Review focus:
Admission no longer counts irreversible + external effects.
The Full Access request path no longer excludes them.
Authorized Browser/Computer sessions return to per-session authorization.
The generic path forces the Channel card only for each-use secrets and management.
Unchanged: bot_create, attachment writes, protected management (ADR-0249) and secret each-use. Effect labels are still captured and shown on the cards that do appear.
Source: 71 approval, effect, CLI broker and Full Access test files, 2163 tests passed. The tests that encoded the [Permissions E2] Full Access 下外部不可撤销行为仍过审 #4210 rule are inverted to the restored behavior. Root tsc --noEmit passed. changelog:check, oxfmt --check, check-tool-effects and check-feature-map passed.
Runtime: a Cloud verify Host on this head with the DeepSeek official key. A DM "Reply with the word pong." got the reply pong with zero approval requests in the channel. An earlier commit verified a Subagent call admitted without a card.
…gation
#4266 sent every irreversible external first-party tool through approval,
so DMs, @mentions, Subagents and Assignments each waited for a Human
card. The effect rule now applies only to natively admitted tools
(Browser/Computer actions, protected CLI, secret HTTP writes); tools
admitted without a card before #4210 keep that admission.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lpx6qkvJqKRjdg67NfFT7X
No actionable comments were generated in the recent review.
Walkthrough
The change removes the special approval treatment for replies to a Bot’s own Source Event. It updates admission checks, tests, policy documentation, and release notes to reflect the revised behavior.
Changes: Tool admission policy
Layer / File(s)
Summary
Effect classification and admission checks packages/core/src/workspaces/tool-effects.ts, packages/core/test/*
The Source Event reply override is removed, so messages retain their declared send effects. Irreversible external effects alone no longer require admission approval when admission is existing. Tests cover messaging and delegation tools, approval-required tools, and approval decisions.
Policy documentation and release notes docs/architecture/bot-approval-policy*, changes/*
The policy docs and release notes describe the admission behavior and identify actions that still require approval. The prior Source Event reply changelog entry is removed.
BotHarness/DeepSeekBot#4334: This PR changes the same bot_send_message admission path by adding the Source Event reply exception that this change removes.
This restores card-free admission for Bot messaging and delegation, which is what the PR intends. No concrete regression is established in the reviewed code. Browser and Computer actions, protected CLI, secret HTTP writes, secrets, Bot creation, attachment writes and protected management still require approval. The one unconfirmed point is whether the native approval layer, which lives outside this repository, ever raises a card for Source Event replies. The author's Cloud run saw no card.
Pre-merge checks: 4
Check name
Status
Explanation
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Title check
The title says the PR returns approval behavior to its pre-#4266 state. The changeset does that: it removes the irreversible-and-external approval rule for tools with a non-existing admission, drops t…
Description check
The description follows the template's main sections: Why the change, Harness / Model, and Special things to note (merge risk, verification, regression test status, CI plan). It explains the user prob…
Full details: Title check
Explanation
The title says the PR returns approval behavior to its pre-#4266 state. The changeset does that: it removes the irreversible-and-external approval rule for tools with a non-existing admission, drops the #4334 source-reply exception, and updates the matching tests and docs. The title names the main change, but it does not name the scope (Bot messaging, delegation, Browser/Computer sessions) and it refers to #4266 without saying what the change does.
Full details: Description check
Explanation
The description follows the template's main sections: Why the change, Harness / Model, and Special things to note (merge risk, verification, regression test status, CI plan). It explains the user problem, links #4210 with Refs, and lists verification and gaps. Several template items are missing or unclear: the Issue line uses 'Refs #4210' where the template asks for a Closes or Refs decision with reasoning; the 'Fix PRs' item does not name the regression test that fails without the fix and passes with it, nor give a 'No regression test' reason; the 'Change outline' section is absent, and this change touches no UI, so the author should say so; the CI test plan line does not name the selected mode.
Resolution
Optional improvements: name the regression test that fails without the fix and passes with it (or write 'No regression test: <reason>'), state the CI test plan mode (affected, full, or none) instead of 'as selected by plan tests', and add a short note that the Change outline and UI evidence sections do not apply, or add the outline.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: aba6f6f8-801f-4498-9d2c-3c75ff059e8d
Commits
Reviewing files that changed from the base of the PR and between ac3aeb3 and 9c4f4fd.
Files selected for processing: 7
changes/4334-source-reply-approval.md
changes/restore-send-admission.md
docs/architecture/bot-approval-policy.md
docs/architecture/bot-approval-policy.zh.md
packages/core/src/workspaces/tool-effects.ts
packages/core/test/grant-execution.test.ts
packages/core/test/tool-effects.test.ts
Files with no reviewable changes: 1
changes/4334-source-reply-approval.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
Effect declarations again only label approval cards. Drop the
irreversible-external admission rule, the per-action Browser/Computer
cards after authorization, and the Full Access exception, so messaging,
delegation and CLI operations run as they did before #4210.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lpx6qkvJqKRjdg67NfFT7X
DoodleBears
changed the title
fix(approval): restore card-free admission for Bot messaging and delegation
fix(approval): return to the approval behavior from before #4266
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why the change
#4266 (spec #4210) made every tool declared irreversible + external require approval, even under Full Access. Since then a Human has to approve each Bot DM, @mention, Subagent, Assignment and outbound CLI operation, and every click or keystroke in an authorized Browser or Computer session. The product owner decided to return to the approval behavior from before #4266: effect declarations only label cards.
Refs #4210
Harness / Model
Harness: claude-code
Model: claude-opus-5-5
Special things to note
bot_create, attachment writes, protected management (ADR-0249) and secret each-use. Effect labels are still captured and shown on the cards that do appear.changes/4210-irreversible-external-approval.mdand the Computer video sentence in the [Permissions] Complete Bot rule management, template deletion and CLI approval effects #4266 fragment, updatesbot-approval-policy(en/zh),bot-cli(en/zh) and the verify feature map, and supersedes the fix(approval): admit a Bot reply to its own Source Event without a card #4334 fragment.tsc --noEmitpassed.changelog:check,oxfmt --check,check-tool-effectsandcheck-feature-mappassed.pongwith zero approval requests in the channel. An earlier commit verified a Subagent call admitted without a card.plan tests.https://claude.ai/code/session_01Lpx6qkvJqKRjdg67NfFT7X
Generated by Claude Code